package Task1;

public class Calc {
	public static void main(String[] args) {
		int len=args.length;
		double a,b,res=0;
		char oper;

		if (len!=3) {
			System.out.println("Length Error!");
		} else {
			oper=args[1].charAt(0);
			if ((oper!='+') & (oper!='-') & (oper!='x') & (oper!='/')){ 
				System.out.println("Wrong operation!");
			} else {
				a=Double.parseDouble(args[0]);
				b=Double.parseDouble(args[2]);
				switch(oper) {
				case '+': 
					res=a+b;
					break;
				case '-':
					res=a-b;
					break;
				case 'x':
					res=a*b;
					break;
				case '/':
					res=a/b;
					break;
				} 
			System.out.println(res);     
			} 
		} 
  	}
}